package com.gmail.sakamoto.jun05;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class MainMenuActivity extends ListActivity {

	@Override
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);

		setContentView(R.layout.menu);

		ArrayAdapter<String> array = new ArrayAdapter<String>(this,
				android.R.layout.simple_list_item_1);
		array.add("映画館を調べる");
		this.setListAdapter(array);

	}

	@Override
	public void onResume() {
		super.onResume();

	}

	@Override
	protected void onListItemClick(ListView listView, View v, int position,
			long id) {
		super.onListItemClick(listView, v, position, id);
		String item = (String) listView.getItemAtPosition(position);

		Log.v("", String.format("onListItemClick: %s", item));
		if ("映画館を調べる".equals(item)) {

			Intent intent = new Intent(getApplicationContext(),
					CinemaMapActivity.class);
			startActivity(intent);
		}

	}
}
